/*
 * Copyright (c) 2021. Moses All Right Reserved
 */

package com.moses.design_patterns.factory_method.single_factory.eager;

import com.moses.design_patterns.factory_method.IProduct;
import com.moses.design_patterns.factory_method.ProductA;
import com.moses.design_patterns.factory_method.single_factory.SingletonFactory;

/**
 * @author Moses
 * @email shenhuohui@gmail.com
 * @date 2021/4/11 11:23
 */
public class EagerSingletonFactory extends SingletonFactory {

    private static IProduct product = null;
    static {
        product = new ProductA();
    }

    @Override
    public IProduct getProduct() {
        return product;
    }
}
